/*
 * @Description:
 * @Version: 2.0
 * @Autor: snzo.chen
 * @Date: 2023-12-07 17:20:01
 * @LastEditors: snzo.chen
 * @LastEditTime: 2023-12-08 09:12:55
 */
import { BaseResponse, request } from '@/utils/request';

export function selectAllPerson(params: API.TouristItem) {
  return request<API.BaseResult>(
    {
      url: '/tourist/deleteTicketUserTourist',
      method: 'get',
      params,
    },
    {
      isGetDataDirectly: false,
    },
  );
}
export function insertTicketUserTourist(data: API.TouristItem) {
  return request<API.BaseResult>(
    {
      url: '/tourist/insertTicketUserTourist',
      method: 'post',
      data,
    },
    {
      isGetDataDirectly: false,
    },
  );
}

export function selectAllTourist(params: API.PageParams) {
  return request<API.SeachResult<API.TouristItem[]>>(
    {
      url: '/tourist/selectAll',
      method: 'get',
      params,
    },
    {
      isGetDataDirectly: true,
    },
  );
}

export function selectTouristByExample(data: API.TouristItem, params: API.PageParams) {
  return request<API.SeachResult<API.TouristItem[]>>(
    {
      url: '/tourist/selectByExample',
      method: 'post',
      data,
      params,
    },
    {
      isGetDataDirectly: true,
    },
  );
}

export function selectTouristById(params: API.TouristItem) {
  return request<BaseResponse<API.TouristItem[]>>(
    {
      url: '/tourist/selectById',
      method: 'get',
      params,
    },
    {
      isGetDataDirectly: true,
    },
  );
}
export function updateTicketUserTourist(data: API.TouristItem) {
  return request<BaseResponse<API.TouristItem[]>>(
    {
      url: '/tourist/updateTicketUserTourist',
      method: 'post',
      data,
    },
    {
      isGetDataDirectly: false,
    },
  );
}
